package com.app.implementation.dao;


import com.app.model.Interventions;
import com.app.interfaces.interfaceDAO;
import java.util.List;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

/**
 *
 * @author Krachleur
 */
public class InterventionDaoImpl extends HibernateDaoSupport implements interfaceDAO {

    public void save(Object inst) {
        Interventions interv = (Interventions)inst;
        this.getHibernateTemplate().save(interv);
    }

    public void modify(Object inst) {
        Interventions interv = (Interventions)inst;
        this.getHibernateTemplate().update(interv);
    }

    public void delete(Object inst) {
        Interventions interv = (Interventions)inst;
        this.getHibernateTemplate().delete(interv);
    }

    public List findAll() {
        return (List)this.getHibernateTemplate().loadAll(Interventions.class);
    }

}
